package com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.steward;

import com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.domain.GooBaseGoodsAttribute;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.domain.GooBaseGoodsAttributeCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class GooBaseGoodsAttributeResponse {

    @Autowired
    private GooBaseGoodsAttributeResController gooBaseGoodsAttributeResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttribute.class).flatMap(gooBaseGoodsAttribute ->
                gooBaseGoodsAttributeResController.add(req, gooBaseGoodsAttribute)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeCondition.class).flatMap(gooBaseGoodsAttributeCondition ->
                gooBaseGoodsAttributeResController.delete(req, gooBaseGoodsAttributeCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttribute.class).flatMap(gooBaseGoodsAttribute ->
                gooBaseGoodsAttributeResController.modify(req, gooBaseGoodsAttribute)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return gooBaseGoodsAttributeResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return gooBaseGoodsAttributeResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return gooBaseGoodsAttributeResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeCondition.class).flatMap(gooBaseGoodsAttributeCondition ->
                gooBaseGoodsAttributeResController.auditSubmit(req, gooBaseGoodsAttributeCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeCondition.class).flatMap(gooBaseGoodsAttributeCondition ->
                gooBaseGoodsAttributeResController.audit(req, gooBaseGoodsAttributeCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeCondition.class).flatMap(gooBaseGoodsAttributeCondition ->
                gooBaseGoodsAttributeResController.auditReject(req, gooBaseGoodsAttributeCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeCondition.class).flatMap(gooBaseGoodsAttributeCondition ->
                gooBaseGoodsAttributeResController.usingEnable(req, gooBaseGoodsAttributeCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsAttributeCondition.class).flatMap(gooBaseGoodsAttributeCondition ->
                gooBaseGoodsAttributeResController.usingDisable(req, gooBaseGoodsAttributeCondition)
        );
    }   

}
